/**
 * @param {string} path 路径
 * @param {string} name 路由名称
 * @param {Object} component 组件路径
 * @param {string} redirect 重定向
 * @param {string} meta 路由元信息
 * @param {Array} children 子路由
 * @param {boolean} isLogin 是否需要登录
 * @param {boolean} keepAlive 是否需要缓存
 * */

const Layout = () => import('@/layout/index.vue')
// const newLayout = () => import('@/layout/new-layout.vue')
const routes = [
	{
		path: '/',
		component: Layout,
		redirect: '/index',
		children: [
			// 如果想添加新的布局
			// {
			//   path: '/new-layout',
			//   component: () => import('@/layout/new-layout'),
			//   children: [
			//     {
			//       path: '/new-layout/index',c:\Users\douzhiyuan\Desktop\work\ow0713\src\layoutc:\Users\douzhiyuan\Desktop\work\ow0713\src\layoutc:\Users\douzhiyuan\Desktop\work\ow0713\src\layout
			//       component: () => import('@/views/home/index'),
			//       meta: {
			//         title: 'route.index',
			//       },
			//     },
			{
				path: '/index',
				name: 'Home',
				component: () => import('@/views/home/index.vue'),
				meta: {
					title: '',
				},
			},
		],
	},
	{
		path: '/test',
		name: 'test',
		component: () => import('@/views/test/index.vue'),
		meta: {
			title: 'test',
		},
	},
	{
		path: '/404',
		name: '404',
		component: () => import('@/views/404/index.vue'),
		meta: {
			title: '404',
		},
	},
	{
		path: '/:pathMatch(.*)*',
		redirect: '/404',
	},
]

export default routes
